<%-------------------------------------------------------------------
 * 页面名称：auditRuleList.jsp
 * 功能描述：查看和修改审核规则
 * Action  : /toAmendAuditRuleFirst.do
 *
 *-------------------------------------------------------------------
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib uri="struts-html.tld" prefix="html"%>
<%@ taglib uri="struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="struts-logic.tld" prefix="logic"%>
<%@ taglib uri="struts-bean.tld" prefix="bean"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ipb" uri="/WEB-INF/conf/tld/ipb.tld"%>
<%@ taglib prefix="ad" uri="agiledata"%>
<%
String path = request.getContextPath();
%>
<script languange="javascript" type="text/javascript">
function getRadioValue(radioObject){
	if(radioObject.length==undefined){
		if(radioObject.checked) return radioObject.value;
	}else{
		for(var i=0;i<radioObject.length;i++){
			if(radioObject[i].checked) return radioObject[i].value;
		}
	}
	return undefined;
}
function todo(action){
	var id = getRadioValue(document.getElementsByName("id"));
	if(id!=undefined){
		document.location.href = "<%=path%>/page/audit/"+action+"?id="+id;
	}else{
		alert("请先选择一个审核规则");
	}
}
function remove(id){
	if(confirm("您正在删除一条审核规则。您确认需要删除吗？")){
		if(id!=undefined){
			var used = document.getElementById("used_"+id).value;	
				document.location.href = "<%=path%>/page/audit/deleteAuditRule.do?id="+id;
		}else{
			alert("请先选择一个审核规则");
		}
	}
}
function amend(id){
	if(id!=undefined){
		document.forms[0].id.value=id;
		document.forms[0].submit();
	}else{
		alert("请先选择一个审核规则");
	}
}
function detail(id){
	if(id!=undefined){
		var used = document.getElementById("used_"+id).value;
		document.location.href = "<%=path%>/page/audit/auditRuleDetail.do?id="+id;
	}else{
		alert("请先选择一个审核规则");
	}
}
</script>
<div id="main">
	<div class="content_right">
		<div style="width:745px;margin-left:10px;">
			<div class="titleinfo">
				查看和修改审核规则
			</div>
			<div class="edit_pass">
				<html:form action="/toAmendAuditRuleFirst.do">
					<input type="hidden" name="id" value="" />
					<table width="100%" class="tablestyle">
						<tr>
							<th>
								<span class="blue14">交易类型</span>
							</th>
							<th>
								<span class="blue14">规则名称</span>
							</th>
							<th>
								<span class="blue14">查看</span>
							</th>
							<th>
								<span class="blue14">编辑</span>
							</th>
							<th>
								<span class="blue14">删除</span>
							</th>
						</tr>
						<logic:iterate id="result" name="ResultList" indexId="i">
							<tr>
								<td>
									<bean:write name="result" property="auditOperandType.name" />
									<input type="hidden"
										id="used_<bean:write name="result" property="id" />"
										value="<bean:write name="result" property="used" />" />
								</td>
								<td>
									<bean:write name="result" property="name" />
								</td>
								<td>
									<!-- 查看 -->
									<a
										href="javascript:detail(<bean:write name="result" property="id" />);">
										<img src="<%=path%>/images/view_icon.gif" width="16"
											height="16" border="0" /> </a>
								</td>
								<td>
									<!-- 修改 -->
									<a
										href="javascript:amend(<bean:write name="result" property="id" />);">
										<img src="<%=path%>/images/edit_icon.gif" width="16"
											height="16" border="0" /> </a>
								</td>
								<td>
									<!-- 删除 -->
									<a
										href="javascript:remove(<bean:write name="result" property="id" />);">
										<img src="<%=path%>/images/del_icon.gif" width="16"
											height="16" border="0" /> </a>
								</td>
							</tr>
						</logic:iterate>
					</table>
					<table width="100%" border="0" align="center" cellpadding="5"
						cellspacing="1">
						<tr>
							<td colspan="2">
								&nbsp;
							</td>
						</tr>
						<tr>
							<td width="9%">
								<img src="<%=path%>/images/corp/operator_4.gif" width="50"
									height="50" class="grayimg">
							</td>
							<td width="91%" class="font_blue">
								如果您需要
								<span class="orang12b">设置操作员权限</span>。
								<br />
								请点击这里
								<span class="lan"><a
									href="<%=path%>/page/myspace/toOperCompetenceList.do">设置操作员权限</a>
								</span>
							</td>
						</tr>
						<tr>
							<td colspan="2">
								&nbsp;
							</td>
						</tr>
					</table>
				</html:form>
			</div>
		</div>
	</div>
</div>
